import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
         theme: ThemeData(
            primaryColor: Colors.blue,
         ),
         home:HomeWidget(),
    );
  }
}

class HomeWidget extends StatefulWidget {
  @override
  _HomeWidgetState createState() => _HomeWidgetState();
}

class _HomeWidgetState extends State<HomeWidget> {
  @override
  Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(
          centerTitle: true,
          leading: IconButton(padding: EdgeInsets.all(14.0) ,onPressed: () => print("object"), icon: Image.asset("res/drawable/drawable-xxhdpi/ic_arrow_left_black_bold.png")),
          title: Text("自定义标题",textAlign: TextAlign.center,),
        titleSpacing: 0.0,),
      body: MyBody(),);
  }
}

class MyBody extends StatefulWidget {
  @override
  _MyBodyState createState() => _MyBodyState();
}

class _MyBodyState extends State<MyBody> {
  @override
  Widget build(BuildContext context) {
    return Container();
  }
}


